package com.yaowk.service.mall.clothing.entity;

import com.yaowk.service.common.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * 商品分类
 */
@Getter
@Setter
@ToString
@Entity
@DynamicUpdate
@DynamicInsert
public class CmGoodsClass extends BaseEntity<Integer> {

    @Column(nullable = false)
    private String name; // 分类名称
    private String description; // 描述
    private String image; // 图片
    @ColumnDefault("0")
    @Column(nullable = false)
    private Integer sort; // 排序
    @ColumnDefault("0")
    @Column(nullable = false, updatable = false)
    private Byte isPublic; // 是否公共的
    @ColumnDefault("1")
    @Column(nullable = false)
    private Byte isShow; // 是否显示
}
